/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package runebound.ui.heroe;

import runebound.modelo.heores.Heroe;

/**
 *
 * @author Miguel (alakat@gmail.com)
 */
public class RBHeroePanel extends javax.swing.JPanel {

    /**
     * Creates new form RBHeroePanel
     */
    public RBHeroePanel() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        cabeceraPanel = new javax.swing.JPanel();
        nombreLabel = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        OroLabel = new javax.swing.JLabel();
        vidaLabel = new javax.swing.JLabel();
        expLabel = new javax.swing.JLabel();
        fatigaLabel = new javax.swing.JLabel();
        cuerpoPanel = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        rBEstadisticasHeroePanel1 = new runebound.ui.heroe.RBEstadisticasHeroePanel();
        jPanel2 = new javax.swing.JPanel();
        rBEquipoHeroePanel1 = new runebound.ui.heroe.RBEquipoHeroePanel();
        jPanel3 = new javax.swing.JPanel();
        rBAliadosPanel2 = new runebound.ui.heroe.RBAliadosPanel();

        jLabel1.setText("jLabel1");

        setLayout(new java.awt.BorderLayout());

        cabeceraPanel.setBackground(new java.awt.Color(204, 204, 204));
        cabeceraPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        cabeceraPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        nombreLabel.setText("jLabel1");
        cabeceraPanel.add(nombreLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(2, 2, 100, 26));

        jPanel4.setBackground(new java.awt.Color(0, 0, 0));
        jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        OroLabel.setBackground(new java.awt.Color(51, 51, 51));
        OroLabel.setFont(new java.awt.Font("Lucida Grande", 3, 18)); // NOI18N
        OroLabel.setForeground(new java.awt.Color(255, 255, 0));
        OroLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        OroLabel.setText("9");
        OroLabel.setToolTipText("Oro");
        jPanel4.add(OroLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 0, 30, 30));

        vidaLabel.setFont(new java.awt.Font("Lucida Grande", 3, 18)); // NOI18N
        vidaLabel.setForeground(new java.awt.Color(204, 0, 51));
        vidaLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        vidaLabel.setText("3/6");
        vidaLabel.setToolTipText("Vida");
        jPanel4.add(vidaLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 30));

        expLabel.setFont(new java.awt.Font("Lucida Grande", 3, 18)); // NOI18N
        expLabel.setForeground(new java.awt.Color(255, 255, 255));
        expLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        expLabel.setText("3/6");
        expLabel.setToolTipText("Experiencia");
        jPanel4.add(expLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 0, -1, 30));

        fatigaLabel.setFont(new java.awt.Font("Lucida Grande", 3, 18)); // NOI18N
        fatigaLabel.setForeground(new java.awt.Color(255, 153, 0));
        fatigaLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        fatigaLabel.setText("3/6");
        fatigaLabel.setToolTipText("Fatiga");
        jPanel4.add(fatigaLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 0, -1, 30));

        cabeceraPanel.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(126, 2, 190, -1));

        add(cabeceraPanel, java.awt.BorderLayout.NORTH);

        cuerpoPanel.setLayout(new java.awt.GridLayout());

        jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.BOTTOM);

        jPanel1.add(rBEstadisticasHeroePanel1);

        jTabbedPane1.addTab("EST", jPanel1);

        jPanel2.add(rBEquipoHeroePanel1);

        jTabbedPane1.addTab("EQU", jPanel2);
        jPanel2.getAccessibleContext().setAccessibleName("");
        jPanel2.getAccessibleContext().setAccessibleDescription("");

        jPanel3.add(rBAliadosPanel2);

        jTabbedPane1.addTab("ALI", jPanel3);

        cuerpoPanel.add(jTabbedPane1);
        jTabbedPane1.getAccessibleContext().setAccessibleName("ALI");
        jTabbedPane1.getAccessibleContext().setAccessibleDescription("");

        add(cuerpoPanel, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel OroLabel;
    private javax.swing.JPanel cabeceraPanel;
    private javax.swing.JPanel cuerpoPanel;
    private javax.swing.JLabel expLabel;
    private javax.swing.JLabel fatigaLabel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel nombreLabel;
    private runebound.ui.heroe.RBAliadosPanel rBAliadosPanel2;
    private runebound.ui.heroe.RBEquipoHeroePanel rBEquipoHeroePanel1;
    private runebound.ui.heroe.RBEstadisticasHeroePanel rBEstadisticasHeroePanel1;
    private javax.swing.JLabel vidaLabel;
    // End of variables declaration//GEN-END:variables

    /**
     * Inicializa la interfaz con la información del heroe activo
     * @param h 
     */
    public void activeHeroe(Heroe h){
        //Cabecera
        this.nombreLabel.setText(h.getNombre());
        this.nombreLabel.setToolTipText(h.getDescripcion());
        this.vidaLabel.setText(h.getVidaActual()+"/"+h.getVida());
        this.fatigaLabel.setText(h.getFatigaActual()+"/"+h.getFatiga());
        this.expLabel.setText(h.getExperienciaActual()+"/"+h.getExperienciaTotal());
        this.OroLabel.setText(""+h.getOro());
        //Estadisticos
        this.rBEstadisticasHeroePanel1.activeHeroe(h);
        //Equipo
        this.rBEquipoHeroePanel1.activeHeroe(h);
        //alisados
        this.rBAliadosPanel2.activeHeroe(h);
    }
}
